package com.fept.msgcore.msgserver.protocol.model.message;

import com.fept.msgcore.msgserver.common.model.ToString;
import com.fept.msgcore.msgserver.senderinfo.SenderStatMachine;

/**
 * Created by Srma on 2/9/2017.
 */
public class SenderModel extends ToString {

    /**
     *
     */
    private static final long serialVersionUID = -3234356506887714798L;

    public static final int INVALID_SENDER_ID = 0x00FFFFFF;

    private int senderID;
    private String senderIP;
    private int senderPort;
    private SenderStatMachine senderStatMachine = new SenderStatMachine();

    private long lastRefreshTime = System.currentTimeMillis();

    /**
     * @return the senderID
     */
    public int getSenderID() {
        return senderID;
    }

    /**
     * @param senderID
     *            the senderID to set
     */
    public void setSenderID(int senderID) {
        this.senderID = senderID;
    }

    /**
     * @return the lastRefreshTime
     */
    public long getLastRefreshTime() {
        return lastRefreshTime;
    }

    /**
     * @param lastRefreshTime
     *            the lastRefreshTime to set
     */
    public void setLastRefreshTime(long lastRefreshTime) {
        this.lastRefreshTime = lastRefreshTime;
    }

    /**
     * @return the senderStatMachine
     */
    public SenderStatMachine getSenderStatMachine() {
        return senderStatMachine;
    }

    /**
     * @param senderStatMachine
     *            the senderStatMachine to set
     */
    public void setSenderStatMachine(SenderStatMachine senderStatMachine) {
        this.senderStatMachine = senderStatMachine;
    }

    /**
     * @return the senderIP
     */
    public String getSenderIP() {
        return senderIP;
    }

    /**
     * @param senderIP
     *            the senderIP to set
     */
    public void setSenderIP(String senderIP) {
        this.senderIP = senderIP;
    }

    public int getSenderPort() {
        return senderPort;
    }

    public void setSenderPort(int senderPort) {
        this.senderPort = senderPort;
    }

}
